package cm.mefobe.android.telecomcost.view;

import cm.mefobe.android.telecomcost.dialog.VoiceRateWizard;
import android.content.Context;
import android.graphics.Canvas;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;

public class WizardButtons extends LinearLayout {

	private Context _context;
	private Button btnClose;
	private Button btnPrevious;
	
	public Button getBtnPrevious() {
		return btnPrevious;
	}

	public Button getBtnNext() {
		return btnNext;
	}

	private Button btnNext;
	public WizardButtons(Context context,VoiceRateWizard voiceRateWizard) {
		super(context);
		Log.i("TimePickerView", "creating the time picker view for ");
		_context = context;
	}

	@Override
	protected void onAttachedToWindow() {
		Log.i("TimePickerView", "onAttachedToWindow");
		super.onAttachedToWindow();
	}

	@Override
	protected void onDraw(Canvas canvas) {
		Log.i("TimePickerView", "onDraw");
		super.onDraw(canvas);
	}

	@Override
	protected void onFinishInflate() {
		Log.i("TimePickerView", "onFinishInflate");
		super.onFinishInflate();
		setButtons();
	}

	private void setButtons() {
		btnClose = new Button(_context);
		btnNext = new Button(_context);
		btnPrevious = new Button(_context);
		setOrientation(LinearLayout.HORIZONTAL);
		
		btnClose.setText("Close");
		btnNext.setText ("  >> ");
	    btnPrevious.setText("  << ");
	    
	    addView(btnClose);
	    addView(btnNext);
	    addView(btnPrevious);	    
	}

	@Override
	public void updateViewLayout(View view,
			android.view.ViewGroup.LayoutParams params) {
		Log.i("TimePickerView", "updateViewLayout");
		super.updateViewLayout(view, params);
	}
}
